<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
</head>
<body>

<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-tab layui-tab-brief" lay-filter="tabBrief">
            <ul class="layui-tab-title">
                <li class="layui-this">设备号</li>
                <li>IP地址</li>
                <li>银行卡</li>
                <li>关键词黑名单</li>
                <li>身份证黑名单</li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <div class="layui-form layui-card-header layuiadmin-card-header-auto">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">设备号</label>
                                <div class="layui-input-block">
                                    <input type="text" name="device" placeholder="请输入" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">账号</label>
                                <div class="layui-input-block">
                                    <input type="text" name="nick_name" placeholder="请输入" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">时间范围</label>
                                <div class="layui-input-inline" style="width: 350px;">
                                    <input type="text" name="start_time" placeholder="开始时间" autocomplete="off" class="layui-input" style="width: 167px;display: inline" id="start_time_input_1">
                                    -
                                    <input type="text" name="end_time" placeholder="截止时间" autocomplete="off"
                                           class="layui-input" style="width: 167px;display: inline"
                                           id="end_time_input_1">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <button data-index="0" class="layui-btn layuiadmin-btn-orderlist" lay-submit lay-filter="LAY-order-front-search">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                            </div>
                            <div class="layui-inline">
                                <button class="layui-btn layuiadmin-btn-ads" data-dtype="1" data-type="add">添加</button>
                            </div>
                            <div class="layui-inline" style="float: right">
                                <!--<button class="layui-btn layui-btn-warm layuiadmin-btn-ads" data-type="upload">批量导入</button>-->
                            </div>
                        </div>

                        <table id="LAY-ads-applaunch-manage" lay-filter="LAY-ads-applaunch-manage"></table>
                    </div>
                </div>
                <div class="layui-tab-item">
                    <div class="layui-form layui-card-header layuiadmin-card-header-auto">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">IP地址</label>
                                <div class="layui-input-block">
                                    <input type="text" name="ip" placeholder="请输入" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">账号</label>
                                <div class="layui-input-block">
                                    <input type="text" name="nick_name" placeholder="请输入" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">时间范围</label>
                                <div class="layui-input-inline" style="width: 350px;">
                                    <input type="text" name="start_time" placeholder="开始时间" autocomplete="off" class="layui-input" style="width: 167px;display: inline" id="start_time_input_2">
                                    -
                                    <input type="text" name="end_time" placeholder="截止时间" autocomplete="off" class="layui-input" style="width: 167px;display: inline" id="end_time_input_2">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <button data-index="1" class="layui-btn layuiadmin-btn-orderlist" lay-submit
                                        lay-filter="LAY-order-front-search">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                            </div>
                            <div class="layui-inline">
                                <button class="layui-btn layuiadmin-btn-ads" data-dtype="2" data-type="add">添加</button>
                            </div>
                            <div class="layui-inline" style="float: right">
                                <!--<button class="layui-btn layui-btn-warm layuiadmin-btn-ads" data-type="upload">批量导入</button>-->
                            </div>
                        </div>
                    </div>
                    <table id="LAY-ads-apphome-manage" lay-filter="LAY-ads-apphome-manage"></table>
                </div>
                <div class="layui-tab-item">
                    <div class="layui-form layui-card-header layuiadmin-card-header-auto">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">银行卡号</label>
                                <div class="layui-input-block">
                                    <input type="text" name="bank_no" placeholder="请输入" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">账号</label>
                                <div class="layui-input-block">
                                    <input type="text" name="out_trade_no" placeholder="请输入" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">时间范围</label>
                                <div class="layui-input-inline" style="width: 350px;">
                                    <input type="text" name="start_time" placeholder="开始时间" autocomplete="off" class="layui-input" style="width: 167px;display: inline" id="start_time_input_3">
                                    -
                                    <input type="text" name="end_time" placeholder="截止时间" autocomplete="off" class="layui-input" style="width: 167px;display: inline" id="end_time_input_3">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <button data-index="2" class="layui-btn layuiadmin-btn-orderlist" lay-submit lay-filter="LAY-order-front-search">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                            </div>
                            <div class="layui-inline">
                                <button class="layui-btn layuiadmin-btn-ads" data-dtype="3" data-type="add">添加</button>
                            </div>
                            <div class="layui-inline" style="float: right">
                                <!--<button class="layui-btn layui-btn-warm layuiadmin-btn-ads" data-type="upload">批量导入</button>-->
                            </div>
                        </div>
                    </div>
                    <table id="LAY-ads-apphomepop-manage" lay-filter="LAY-ads-apphomepop-manage"></table>
                </div>
                <div class="layui-tab-item">
                    <div class="layui-form layui-card-header layuiadmin-card-header-auto">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">关键词</label>
                                <div class="layui-input-block">
                                    <input type="text" name="kword" placeholder="请输入" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-inline">
                                <label class="layui-form-label">时间范围</label>
                                <div class="layui-input-inline" style="width: 350px;">
                                    <input type="text" name="start_time" placeholder="开始时间" autocomplete="off" class="layui-input" style="width: 167px;display: inline"
                                           id="start_time_input_4">
                                    -
                                    <input type="text" name="end_time" placeholder="截止时间" autocomplete="off" class="layui-input" style="width: 167px;display: inline" id="end_time_input_4">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <button data-index="3" class="layui-btn layuiadmin-btn-orderlist" lay-submit lay-filter="LAY-order-front-search">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                            </div>
                            <div class="layui-inline">
                                <button class="layui-btn layuiadmin-btn-ads" data-dtype="4" data-type="add">添加</button>
                            </div>
                            <div class="layui-inline" style="float: right">
                                <button class="layui-btn layui-btn-warm layuiadmin-btn-ads" data-type="upload" data-dtype="4">批量导入
                                </button>
                            </div>
                        </div>
                    </div>
                    <table id="LAY-ads-svideo-manage" lay-filter="LAY-ads-svideo-manage"></table>
                </div>
                <div class="layui-tab-item">
                    <div class="layui-form layui-card-header layuiadmin-card-header-auto">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">身份证号</label>
                                <div class="layui-input-block">
                                    <input type="text" name="card_no" placeholder="请输入" autocomplete="off"
                                           class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">账号</label>
                                <div class="layui-input-block">
                                    <input type="text" name="out_trade_no" placeholder="请输入" autocomplete="off"
                                           class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">时间范围</label>
                                <div class="layui-input-inline" style="width: 350px;">
                                    <input type="text" name="start_time" placeholder="开始时间" autocomplete="off"
                                           class="layui-input" style="width: 167px;display: inline"
                                           id="start_time_input_5">
                                    -
                                    <input type="text" name="end_time" placeholder="截止时间" autocomplete="off"
                                           class="layui-input" style="width: 167px;display: inline"
                                           id="end_time_input_5">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <button data-index="4" data-index="" class="layui-btn layuiadmin-btn-orderlist" lay-submit
                                        lay-filter="LAY-order-front-search">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                            </div>
                            <div class="layui-inline">
                                <button class="layui-btn layuiadmin-btn-ads" data-dtype="5" data-type="add">添加</button>
                            </div>
                            <div class="layui-inline" style="float: right">
                                <!--<button class="layui-btn layui-btn-warm layuiadmin-btn-ads" data-type="upload">批量导入</button>-->
                            </div>
                        </div>
                    </div>
                    <table id="LAY-ads-appmoments-manage" lay-filter="LAY-ads-appmoments-manage"></table>
                </div>
            </div>

            <script type="text/html" id="table-adslist-1">
                <a class="layui-btn layui-btn-normal layui-btn-xs" data-dtype="1" lay-event="edit"><i class="layui-icon"></i>编辑</a>
                <a class="layui-btn layui-btn-danger layui-btn-xs" data-dtype="1" lay-event="del"><i class="layui-icon"></i>删除</a>
            </script>
            <script type="text/html" id="table-adslist-2">
                <a class="layui-btn layui-btn-normal layui-btn-xs" data-dtype="2" lay-event="edit"><i class="layui-icon"></i>编辑</a>
                <a class="layui-btn layui-btn-danger layui-btn-xs" data-dtype="2" lay-event="del"><i class="layui-icon"></i>删除</a>
            </script>
            <script type="text/html" id="table-adslist-3">
                <a class="layui-btn layui-btn-normal layui-btn-xs" data-dtype="3" lay-event="edit"><i class="layui-icon"></i>编辑</a>
                <a class="layui-btn layui-btn-danger layui-btn-xs" data-dtype="3" lay-event="del"><i class="layui-icon"></i>删除</a>
            </script>
            <script type="text/html" id="table-adslist-4">
                <a class="layui-btn layui-btn-normal layui-btn-xs" data-dtype="4" lay-event="edit"><i class="layui-icon"></i>编辑</a>
                <a class="layui-btn layui-btn-danger layui-btn-xs" data-dtype="4" lay-event="del"><i class="layui-icon"></i>删除</a>
            </script>
            <script type="text/html" id="table-adslist-5">
                <a class="layui-btn layui-btn-normal layui-btn-xs" data-dtype="5" lay-event="edit"><i class="layui-icon"></i>编辑</a>
                <a class="layui-btn layui-btn-danger layui-btn-xs" data-dtype="5" lay-event="del"><i class="layui-icon"></i>删除</a>
            </script>
        </div>
    </div>
</div>

<script src="/layuiadmin/layui/layui.js"></script>
<script>
    layui.config({
        base: '/layuiadmin/'
        , version: "{:config('other.ui_version')}"
    }).extend({
        index: 'lib/index',//主入口模块
    }).use(['index', 'black', 'laydate'], function () {
        var $ = layui.$
            , form = layui.form
            , table = layui.table,
            laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#start_time_input_1',
            type: 'datetime'
        });
        laydate.render({
            elem: '#end_time_input_1',
            type: 'datetime'
        });

        laydate.render({
            elem: '#start_time_input_2',
            type: 'datetime'
        });
        laydate.render({
            elem: '#end_time_input_2',
            type: 'datetime'
        });

        laydate.render({
            elem: '#start_time_input_3',
            type: 'datetime'
        });
        laydate.render({
            elem: '#end_time_input_3',
            type: 'datetime'
        });

        laydate.render({
            elem: '#start_time_input_4',
            type: 'datetime'
        });
        laydate.render({
            elem: '#end_time_input_4',
            type: 'datetime'
        });

        laydate.render({
            elem: '#start_time_input_5',
            type: 'datetime'
        });
        laydate.render({
            elem: '#end_time_input_5',
            type: 'datetime'
        });

        //事件
        var active = {
            add: function () {
                let $type = $(this).attr('data-dtype');
                console.log($type);
                layer.open({
                    type: 2
                    , title: '添加黑名单'
                    , content: '/admin/security/add?type=' + $type
                    , maxmin: true
                    , area: ['650px', '450px']
                });
            },
            upload: function () {
                let $type = $(this).attr('data-dtype');
                $type = $type ? $type : 0;
                layer.open({
                    type: 2
                    , title: '批量导入'
                    , content: '/admin/security/upload?type=' + $type
                    , maxmin: true
                    , area: ['480px', '320px']
                });
            }
        };

        $('.layui-btn.layuiadmin-btn-ads').on('click', function () {
            var type = $(this).data('type');
            active[type] ? active[type].call(this) : '';
        });
    });
</script>
</body>
</html>